fix(i18n): localize built-in tool names - #4010
Conversation
8c1e6a6 to
5452ebe
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Reviewed at exact head 5452ebeebf692b1dfd4875772a4851748e3b421c. Approving with comments (P2 only).
Built-in presentation now resolves from the active UI locale instead of whatever displayName was persisted; external/MCP provider labels are preserved. BUILTIN_TOOL_LABELS + getBuiltinToolLabel / resolveToolName / resolveToolDisplayName is the right split. Core search no longer owns Chinese formatSearchResultSummary; Desktop formats via formatThreadSearchResultSummary, and SearchHistory uses English wire names. Thread search still indexes tool intent only, so localized labels are not searchable — same as before, and the right call.
Locale completeness for listed tools is compile-time (Record<UiLocale, string> against UI_LOCALES = zh | en). Catalog membership is only a unit test.
[P2] Close BUILTIN_TOOL_LABELS over a catalog name union so the next MAKA_CATALOG_TOOLS row cannot silently revive persisted-locale labels.
[P2] Derive BUILTIN_PROXY_PREFIXES from the desktop offer IDs (desktop_browser, desktop_computer_use, desktop_settings, desktop_rive) or pin them with a contract test. Browser/Rive still persist zh displayName.
CI on this SHA is green. Not blocking.
|
Need a rebase~ |
Resolve Maka-owned tool labels from the active UI locale while preserving provider and compatibility labels for non-localized consumers. Move thread search metadata presentation out of Core so historical results follow the current locale. Refs apache#3962 Generated-by: OpenAI Codex
8003ad4 to
cabddd8
Compare
cabddd8 to
9e369c1
Compare
Summary
Built-in tool names can display persisted labels from a different locale. Existing session history can therefore show Chinese labels in English mode or fixed English labels in Chinese mode.
Resolve Maka-owned tool names from the active UI locale instead. Group each tool's translations in one typed table so every supported locale requires a label.
Preserve provider labels for external tools and fall back to their canonical identifiers. Keep the product binding catalog unchanged.
Refs #3962
Verification
npm --workspace @maka/ui test— 234 tests passednpm --workspace @maka/core run build— passedHttpsProxyAgenttype errorsAI use
Select exactly one:
Tool(s) and scope: OpenAI Codex helped inspect the implementation, revise the locale boundary, update tests, and draft this PR.
Checklist
Does this PR entail a change in behavior?